import request from "@/http/request";

//获取全部企业&搜索企业
export function getAllCompany (params) {
  return request.get('/client/enterprise/allEnterprise', params)
}

//创建/加入企业弹窗 模糊搜索全国公司
export function getLikeEnterpriseInformation(params) {
  return request.get('/client/enterprise/likeEnterpriseInformation', params)
}

//创建/加入企业弹窗 判断当前企业是否完成实名认证
export function getEnterpriseInformationAuthentication(params) {
  return request.get('/client/enterprise/enterpriseInformationAuthentication', params)
}

//创建/加入企业弹窗 企业加入申请
export function postAdd(data) {
  return request.post('/client/enterprise/add', data)
}

//将企业信息添加到认证列表
export function postAddEnterprise(data) {
  return request.post('/client/enterprise/addEnterprise', data)
}

//将企业信息从认证列表删除
export function postDeleteUserEnterprise(data) {
  return request.post('/client/enterprise/deleteUserEnterprise', data)
}

//获取企业三要素
export function getAuthenticationInfo(params) {
  return request.get('/client/enterprise/authenticationInfo', params)
}

//给手机号发送认证签署链接
export function getAuthenticationLink(params) {
  return request.get('/client/enterprise/authenticationLink', params)
}

//发送验证码
export function postSmsPhoneCode(data) {
  const formData = new FormData
  formData.set('phone', data.phone)
  return request.post('/client/signUser/getSmsPhoneCode', formData)
}

//手机认证
export function postPhoneAuthenticationInfo(data) {
  return request.post('/client/enterprise/phoneAuthenticationInfo', data)
}